home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 23 code / Documentary Synchronicity ƒ / Resource ƒ / Nongraphical.r < prev    next >
Encoding:
Text File  |  1995-06-18  |  28.1 KB  |  680 lines  |  [TEXT/KAHL]

  1. #define SystemSevenOrLater 1
  2.  
  3. #include <Types.r>
  4. #include <SysTypes.r>
  5. #include <BalloonTypes.r>
  6.  
  7. #include "ResourceDefinitions.h"
  8.  
  9. resource 'WIND' (rDocWindow, "Document Window", purgeable, preload) {
  10.     {50, 10, 290, 395}, zoomDocProc, invisible, goAway, 0x0, "untitled", staggerMainScreen
  11. };
  12.  
  13. resource 'vers' (1, "File version number and Company Copyright", purgeable) {
  14.     0x1, 0x20, development, 0x12, verUS, "1.2d12",
  15.     "1.2d12 (US), © Mark H. Linton 1994, 1995"
  16. };
  17.  
  18. resource 'vers' (2, "Product Name and Version", purgeable) {
  19.     0x1, 0x20, development, 0x12, verUS, "1.2d12",
  20.     "by Mark H. Linton"
  21. };
  22.  
  23. resource 'kind' (1000) {
  24.     '.oO~',
  25.     0,
  26.     {
  27.         '.oO~', "Really Cool Document!"
  28.     }
  29. };
  30.  
  31. resource 'STR#' (rRevisionInfo, "Revision Information") {
  32.     {
  33.         "1.2d12 - Added Balloon Help for the pop-up navugation menu and over-ride help "
  34.                 "for the document window title bar, also added general balloon help, also "
  35.                 "made \"Stack Windows\" command refresh the windows.",
  36.         "1.2d11 - Per \"Copland Technical Overview\" from WWDC, using STRICT_WINDOWS"
  37.                 ", STRICT_CONTROLS, and STRICT_MENUS and not OLDROUTINENAMES or "
  38.                 "OLDROUTINELOCATIONS. Add Copland.h as prefix to compile.",
  39.         "1.2d10 - Was installing AppleEvent Handlers before checking for the presence "
  40.                 "of the AppleEvent Manager. Now check for required features before "
  41.                 "doing ANYTHING!",
  42.         "1.2d9 - Was calling GetNewCWindow without first checking for the presence of "
  43.                 "ColorQuickdraw - Sorry Ted =^} (sheepish grin)."
  44.         "1.2d8 - Incorporated \"manual\" put away if Scriptable Finder is not available. "
  45.                 "Code courtesy of Dave Johnson - Thanks.",
  46.         "1.2d8 (Continued) - Disabled items in popup navigation menu if Scriptable Finder "
  47.                 "is not available.",
  48.         "1.2d8 (Continued) - Changed CommandKeyIsDown because it broke going from CW5 to "
  49.                 "CW6. I'm not really sure why =^} (sheepish grin).",
  50.         "1.2d8 (Continued) - Added OptionKeyIsDown and use it now in DSPopupNavigation. If "
  51.                 "the option key is held down when an item is selected from the popup "
  52.                 "navigation menu it hides the application in addition to revealing the item.",
  53.         "1.2d8 (Continued) - Changed GetVolumeModDate to use PBHGetVInfo and the ioVLsMod field "
  54.                 "rather than PBGetVInfo and the ioVLsBkUp field -- per Jim Luther - Thanks. "
  55.                 "Changed routine names and field names accordingly.",
  56.         "1.2d8 (Continued) - Removed GetFileName and replaced all occurrences with "
  57.                 "GetNameOfReferencedFile since they were redundant - Thanks Jim.",
  58.         "1.2d8 (Continued) - Changed GetFolderParID and GetFolderName to accept a vRefNum "
  59.                 "parameter. Previously they had always used the default volume (0) - "
  60.                 "Thanks Jim.",
  61.         "1.2d8 (Continued) - Changed CanAccess to use PBGetCatInfo and the ioACUser (filler2) "
  62.                 "field rather than PBHGetDirAccess and the ioACAccess field - Thanks Jim.",
  63.         "1.2d8 (Continued) - Removed references to kWhereToEmptyTrashFolderType from "
  64.                 "FileInTrashCan and GetTrashFolder since they were redundant. Also removed "
  65.                 "the desktop because it was confusing and didn't help that much - Thanks Jim.",
  66.         "1.2d8 (Continued) - Removed FileOnExternalVolume because it was wrong and nobody "
  67.                 "was using it - Thanks Jim.",
  68.         "1.2d8 (Continued) - Reduced amount of stack required by FSGetFolderSize/GetDirectorySize "
  69.                 "by making some parameters static and eliminating another - also check that enough "
  70.                 "stack is available before continuing - Thanks Jim.",
  71.         "1.2d8 (Continued) - Also changed GetDirectorySize to use physical rather than logical sizes.",
  72.         "1.2d8 (Continued) - Changed InBackground to use SameProcess rather than manual comparison "
  73.                 "- Thanks Jim",
  74.         "1.2d8 (Continued) - Changed GetSignature, GetProcessName and FindFinder to pass nil in "
  75.                 "the process manager parameter blocks for those parameters I'm not interested "
  76.                 "in - Thanks Jim.",
  77.         "1.2d8 (Continued) - Changed GetFilesVolume to check ioFCBVRefNum rather than ioVRefNum.",
  78.         "1.2d8 (Continued) - Removed aName from the CanAccess parameter list. Also modified it to "
  79.                 "ignore the bit indicating that the user is the owner.",
  80.         "1.2d8 (Continued) - Didn't change much this time. Did we? =^)",
  81.         "1.2d7 - Changed logic of when to DSSyncWindowsWithFiles. Previous version "
  82.                 "was incorrect and it's use was less than straight-forward. Thanks "
  83.                 "again Dave.",
  84.         "1.2d6 - Added Gestalt check for System 7 _ONLY_. Some of our techniques "
  85.                 "will have to be revisited under Copland and rather than guessing "
  86.                 "wrong now we simply make it stop working.",
  87.         "1.2d6 (Continued) - Added a Boolean parameter to DSSyncWindowsWithFiles to "
  88.                 "allow immeditate synchronization. Useful on Resume events.",
  89.         "1.2d6 (Continued) - Changed DSFindWindow to call DSPopUpNavigation directly "
  90.                 "and changed DSFindWindow to return inDesk, nil in the previous "
  91.                 "inNavigator case.",
  92.         "1.2d6 (Continued) - Removed alert from HandleDirectoryChange. If user ends "
  93.                 "up not having access to the new directory, the pop-up will show it "
  94.                 "and the next Save will revert to a Save As.",
  95.         "1.2d5 - Changed alert for closing a dirty document because it was moved "
  96.                 "to the trash based on a recomendation from Elizabeth Moller - Thanks!",
  97.         "1.2d4 - Changed name of HandleMoveAccessDenied to HandleDirectoryChange "
  98.                 "and changed order of HandleXXX routines.",
  99.         "1.2d3 - Added a copyright to the \"About...\" box..",
  100.         "1.2d2 - Added Stack Windows code (only correct for single monitor).",
  101.         "1.2d1 - Added check of space in trash in SafeSave. Other minor tweeks.",
  102.         "1.2d0 - Added MW/C Project Support. Fixed a bug in Document.c where I forgot "
  103.                 "to set the return code to noErr in case of success. Changed seperate "
  104.                 "globals in Toolbox.c to a single global structure 't'.",
  105.         "1.1d6 - Fixed resource v. data comment in SafeSave. Close resource fork if "
  106.                 "present in main. Use process manager and not globals/resume event "
  107.                 "to determine for/back sleep.",
  108.         "1.1d5 - Corrected '==' vs. '=' error in EvenMoreFiles.c and DSGetDFRefNum v. "
  109.                 "DSGetRFRefNum error in SafeSave.c - my thanks to Dave Johnson.",
  110.         "1.1d5 (Continued) - John Norstad was correct when he said how important it is "
  111.                 "to use the full union in the PBxxx file manager calls.",
  112.         "1.1d5 (Continued) - Using only the specified PORTION of the union may result "
  113.                 "in stack stompage -- all EvenMoreFiles routines updated. Thanks to UMPG.",
  114.         "1.1d5 (Continued) - Never close a file that doesn't exist! -- SafeSave.c "
  115.                 "updated to only close files with non-zero reference numbers.",
  116.         "1.1d5 (Continued) - Incorporated Dave Johnson's suggestions about how to do polling "
  117.                 "for name synchronization into main.c.",
  118.         "1.1d5 (Continued) - Updated 'View' menu to not use second divider and to disable "
  119.                 "view options if no documents are present.",
  120.         "1.1d5 (Continued) - Added Boolean parameter to DoCloseCommand to decide whether "
  121.                 "to prompt user to save (already done in drag to Trash case) -- thanks to "
  122.                 "Dave Johnson. It is GREAT to have ßeta Testers!",
  123.         "1.1d4 - Modified DSSyncWindowsWithFiles to perform a single tick-check, rather "
  124.                 "than one for each document.",
  125.         "1.1d4 (Continued) - Modified DoSyncChecks to be more general case "
  126.                 "checking the volume modification date first for all documents rather than "
  127.                 "only for ones on external volumes.",
  128.         "1.1d3 - Fixed code that uses DoCloseCommand to handle userCancelledError correctly. "
  129.                 "Added Revert command.",
  130.         "1.1d2 - Added place-holders for New View, Tile Windows, and Stack Windows in the "
  131.                 "View menu. They do not do anything but they show that you do not lose "
  132.                 "the ability to provide alternate views by handling re-opening a document "
  133.                 "properly.",
  134.         "1.1d1 - Fixed HandleMoveToTrash so that it doesn't ask the user to save changes to "
  135.                 "a document that is clean.",
  136.         "1.1d0 - Added heap setup & grow zone. Added document content. Fixed bug preventing "
  137.                 "unsaved windows from closing. Fixed bug which lost document icon.",
  138.         "1.1d0 (Continued) - Changed to use new routine names/locations. Removed unused "
  139.                 "routines/variables. Added contributors to About...",
  140.         "1.0d2 - Changed the way file names are appended to menus to use AppendMenu "
  141.                 "and SetMenuItemText, rather than just AppendMenu.", 
  142.         "1.0d2 (Continued) - This is needed since a file name can contain meta-characters "
  143.                 "which would be interpreted by AppendMenu. SetMenuItemText does not interpret "
  144.                 "meta-characters.",
  145.         "1.0d1 - Baseline for \"develop\" submission. Changed text of rCloseAlert "
  146.                 "cancel button to \"Remove From Trash\". Changed logic in DoSyncChecks.",
  147.         "0.2d1 - Added an InBackground check to drag-to-trash so that when multiple "
  148.                 "files are trashed only one notice is presented.",
  149.         "0.2d0 - Added some humor to the \"About...\" box. Added a zoom-to-trash visual"
  150.                 " feedback when the item is dragged to the trash in Finder.",
  151.         "0.1d8 - Completely restructured the source code. Added a scrolling styled"
  152.                 "-text about box. Check privileges of directory on moves. Use icon of"
  153.                 " reasonable style for volume type, etc.",
  154.         "0.1d7 - Now check for the features I use (I think) before I use them.",
  155.         "0.1d6 - Check for document dirty when closing on drag-to-trash. If so, post "
  156.                 "notice, wait until front, ask [save|dont|cancel]. If cancel, send "
  157.                 "kAEPutAway, kAEFinderSuite.",
  158.         "0.1d5 - Fixed a bug where \"Save\" would be enabled any time ANY document "
  159.                 "had an associated file reference number, NOT just the FRONT one.",
  160.         "0.1d4 - Added preflight check of volume modification date before going across "
  161.                 "network for synchronization.",
  162.         "0.1d3 - Added handling of trying to open a file that is open elsewhere on the "
  163.                 "network.",
  164.         "0.1d2 - Added handling for network trash cans and display of desktop in pop-up "
  165.                 "navigator, changed \"Documents\" menu from 'cicn' to text.",
  166.         "0.1d1 - Reduced frequency of name sync for external volumes, added AppleShare "
  167.                 "icon in pop-up if external.",
  168.         "0.1d0 - Initial release to develop editorial staff."
  169.     }
  170. };
  171.  
  172. resource 'STR#' (rAppleMenuHelp, "Apple menu help") {
  173.     { "Hi!", "Copyright 1994\nMark H. Linton" }
  174. };
  175.  
  176. resource 'STR ' (rFinderIconHelp, "Application icon help", purgeable) {
  177.     "Use Documentary Synchronicity to see some cool features you could add to your "
  178.     "application."
  179. };
  180.  
  181. resource 'STR ' (rDesktopString, "String Naming the Desktop Directory", purgeable) {
  182.     "Desktop"
  183. };
  184.  
  185. resource 'STR ' (rAccessDeniedString, "String Indicating Directory Access Denied", purgeable) {
  186.     "Access Denied"
  187. };
  188.  
  189. resource 'STR ' (rNotifyString, "Notify User of Need for Attention", purgeable) {
  190.     "The application “DocumentarySynchronicity” requires your assistance. "
  191.     "Please select it from the Application Menu and bring it to the front."
  192. };
  193.  
  194. resource 'STR ' (-16396, "Missing-application name string", purgeable) {
  195.     "Documentary Synchronicity"
  196. };
  197.  
  198. resource 'MENU' (mApple, "Apple menu", preload) {
  199.     mApple, textMenuProc, 0x7FFFFFFD, enabled, apple,
  200.     {
  201.         "About DocumentarySynchronicity...", noIcon, noKey, noMark, plain,
  202.         "-", noIcon, noKey, noMark, plain
  203.     }
  204. };
  205.  
  206. resource 'hmnu' (mApple, "Apple menu help", purgeable) {
  207.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  208.     HMSkipItem {}, /* No missing Items */
  209.     {
  210.         HMSkipItem {}, /* Title */
  211.         HMStringResItem { rAppleMenuHelp, 2, 0, 0, 0, 0, 0, 0 } /* About application... */
  212.     }
  213. };
  214.  
  215. resource 'MENU' (mFile, "File menu", preload) {
  216.     mFile, textMenuProc, 0x7000, enabled, "File",
  217.     {
  218.         "New", noIcon, "N", noMark, plain,
  219.         "Open…", noIcon, "O", noMark, plain,
  220.         "-", noIcon, noKey, noMark, plain,
  221.         "Close", noIcon, "W", noMark, plain,
  222.         "Save", noIcon, "S", noMark, plain,
  223.         "Save As…", noIcon, noKey, noMark, plain,
  224.         "Revert", noIcon, noKey, noMark, plain,
  225.         "-", noIcon, noKey, noMark, plain,
  226.         "Page Setup…", noIcon, noKey, noMark, plain,
  227.         "Print…", noIcon, "P", noMark, plain,
  228.         "-", noIcon, noKey, noMark, plain,
  229.         "Quit", noIcon, "Q", noMark, plain
  230.     }
  231. };
  232.  
  233. resource 'hmnu' (mFile, "File menu help", purgeable) {
  234.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  235.     HMSkipItem {}, /* No missing items */
  236.     {
  237.         HMStringItem { /* Title */
  238.             "File menu\n\nUse this menu to perform operations with disks, files, folders and printers.", /* Enabled */
  239.             "", /* Application Dimmed */
  240.             "File menu\n\nNot available now because a dialog box is on the screen.", /* System Dimmed - Title Help */
  241.             "This item is not available now because a dialog box is on the screen."  /* System Dimmed - Item Help */
  242.         },
  243.         HMStringItem { /* New */
  244.             "Creates a new document named “untitled”.", /* Enabled */
  245.             "", /* Dimmed */
  246.             "", /* Enabled and Checked */
  247.             ""  /* Enabled and Marked */
  248.         },
  249.         HMStringItem { /* Open */
  250.             "Opens an existing document.", /* Enabled */
  251.             "", /* Dimmed */
  252.             "", /* Enabled and Checked */
  253.             ""  /* Enabled and Marked */
  254.         },
  255.         HMSkipItem {}, /* Divider */
  256.         HMStringItem { /* Close */
  257.             "Closes the active document.", /* Enabled */
  258.             "Closes the active document.\n\nNot available now because no document is open.", /* Dimmed */
  259.             "", /* Enabled and Checked */
  260.             ""  /* Enabled and Marked */
  261.         },
  262.         HMStringItem { /* Save */
  263.             "Saves the active document to its associated disk file.", /* Enabled */
  264.             "Saves the active document to its associated disk file.\n\nNot available now because the document has not been edited since it was last saved.", /* Dimmed */
  265.             "", /* Enabled and Checked */
  266.             ""  /* Enabled and Marked */
  267.         },
  268.         HMStringItem { /* Save As */
  269.             "Saves the active document to a new disk file.", /* Enabled */
  270.             "Saves the active document to a new disk file.\n\nNot available now because no document is open.", /* Dimmed */
  271.             "", /* Enabled and Checked */
  272.             ""  /* Enabled and Marked */
  273.         },
  274.         HMStringItem { /* Revert */
  275.             "Reverts the active document to the last saved version.", /* Enabled */
  276.             "Reverts the active document to the last saved version.\n\nNot available now because the active document has not been saved or has not been edited since it was last saved.", /* Dimmed */
  277.             "", /* Enabled and Checked */
  278.             ""  /* Enabled and Marked */
  279.         },
  280.         HMSkipItem {}, /* Divider */
  281.         HMStringItem { /* Page Setup */
  282.             "Set paper size, orientation, and other printer options.", /* Enabled */
  283.             "Set paper size, orientation, and other printer options.\n\nNot available now because no document is active.", /* Dimmed */
  284.             "", /* Enabled and Checked */
  285.             ""  /* Enabled and Marked */
  286.         },
  287.         HMStringItem { /* Print */
  288.             "Prints the active document.", /* Enabled */
  289.             "Prints the active document.\n\nNot available now because no document is active.", /* Dimmed */
  290.             "", /* Enabled and Checked */
  291.             ""  /* Enabled and Marked */
  292.         },
  293.         HMSkipItem {}, /* Divider */
  294.         HMStringItem { /* Quit */
  295.             "Closes open documents and then quits the application.", /* Enabled */
  296.             "", /* Dimmed */
  297.             "", /* Enabled and Checked */
  298.             ""  /* Enabled and Marked */
  299.         }
  300.     }
  301. };
  302.  
  303. resource 'MENU' (mEdit, "Edit Menu", preload) {
  304.     mEdit, textMenuProc, 0x3FC0, disabled, "Edit",
  305.     {
  306.         "Undo", noIcon, "Z", noMark, plain,
  307.         "-", noIcon, noKey, noMark, plain,
  308.         "Cut", noIcon, "X", noMark, plain,
  309.         "Copy", noIcon, "C", noMark, plain,
  310.         "Paste", noIcon, "V", noMark, plain
  311.         "Clear", noIcon, noKey, noMark, plain
  312.         "Select All", noIcon, "A", noMark, plain
  313.     }
  314. };
  315.  
  316. resource 'hmnu' (mEdit, "Edit menu help", purgeable) {
  317.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  318.     HMSkipItem {}, /* No missing items */
  319.     {
  320.         HMStringItem { /* Title */
  321.             "Edit menu\n\nUse this menu to work with items in the active document and to undo actions.", /* Enabled */
  322.             "Edit menu\n\nUse this menu to work with items in the active document and to undo actions.\n\nNot available now because it is not present in this version.", /* Application Dimmed */
  323.             "Edit menu\n\nNot available now because a dialog box is on the screen.", /* System Dimmed - Title Help */
  324.             "This item is not available now because a dialog box is on the screen."  /* System Dimmed - Item Help */
  325.         },
  326.         HMStringItem { /* Undo */
  327.             "Reverses your last action.", /* Enabled */
  328.             "Reverses your last action.\n\nNot available now because your last action can't be undone.", /* Dimmed */
  329.             "", /* Enabled and Checked */
  330.             ""  /* Enabled and Marked */
  331.         },
  332.         HMSkipItem {}, /* Divider */
  333.         HMStringItem { /* Cut */
  334.             "Removes the selected item and places it on the Clipboard, replacing the Clipboard's contents.", /* Enabled */
  335.             "Removes the selected item and places it on the Clipboard, replacing the Clipboard's contents.\n\nNot available now because no item is selected.", /* Dimmed */
  336.             "", /* Enabled and Checked */
  337.             ""  /* Enabled and Marked */
  338.         },
  339.         HMStringItem { /* Copy */
  340.             "Copies the selected item and places it on the Clipboard, replacing the Clipboard's contents.", /* Enabled */
  341.             "Copies the selected item and places it on the Clipboard, replacing the Clipboard's contents.\n\nNot available now because no item is selected.", /* Dimmed */
  342.             "", /* Enabled and Checked */
  343.             ""  /* Enabled and Marked */
  344.         },
  345.         HMStringItem { /* Paste */
  346.             "Inserts the contents of the Clipboard into the active document, replacing any selected items.", /* Enabled */
  347.             "Inserts the contents of the Clipboard into the active document, replacing any selected items.\n\nNot available now because the Clipboard is empty or no document is open.", /* Dimmed */
  348.             "", /* Enabled and Checked */
  349.             ""  /* Enabled and Marked */
  350.         },
  351.         HMStringItem { /* Clear */
  352.             "Removes the selected item without placing it on the Clipboard.", /* Enabled */
  353.             "Removes the selected item without placing it on the Clipboard.\n\nNot available now because no item is selected.", /* Dimmed */
  354.             "", /* Enabled and Checked */
  355.             ""  /* Enabled and Marked */
  356.         },
  357.         HMStringItem { /* Select All */
  358.             "Selects all items in the current document.", /* Enabled */
  359.             "Selects all items in the current document.\n\nNot available now because no document is open.", /* Dimmed */
  360.             "", /* Enabled and Checked */
  361.             ""  /* Enabled and Marked */
  362.         }
  363.     }
  364. };
  365.  
  366. resource 'MENU' (mDocument, "View Menu", preload) {
  367.     mDocument, textMenuProc, allEnabled, enabled, "View",
  368.     {
  369.         "New View", noIcon, noKey, noMark, plain,
  370.         "-", noIcon, noKey, noMark, plain,
  371.         "Tile Windows", noIcon, noKey, noMark, plain,
  372.         "Stack Windows", noIcon, noKey, noMark, plain,
  373.     }
  374. };
  375.  
  376. resource 'hmnu' (mDocument, "View menu help", purgeable) {
  377.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  378.     HMStringItem { /* Missing Items -- The added documents */
  379.         "This document is behind the active document.\n\nTo make this document active, select this item.", /* Enabled */
  380.         "", /* Dimmed */
  381.         "This is the active document.", /* Enabled and Checked */
  382.         ""  /* Enabled and Marked */
  383.     },
  384.     {
  385.         HMStringItem { /* Title */
  386.             "View menu\n\nUse this menu to switch or rearrange document windows.", /* Enabled */
  387.             "", /* Application Dimmed */
  388.             "View menu\n\nNot available now because a dialog box is on the screen.", /* System Dimmed - Title Help */
  389.             "This item is not available now because a dialog box is on the screen."  /* System Dimmed - Item Help */
  390.         },
  391.         HMStringItem { /* New View */
  392.             "Creates new view of the active document.", /* Enabled */
  393.             "Creates new view of the active document.\n\nNot available now because no document is active.", /* Dimmed */
  394.             "", /* Enabled and Checked */
  395.             ""  /* Enabled and Marked */
  396.         },
  397.         HMSkipItem {}, /* Divider */
  398.         HMStringItem { /* Tile Windows */
  399.             "Arranges all open document windows in a tiled pattern.", /* Enabled */
  400.             "Arranges all open document windows in a tiled pattern.\n\nNot available now because at least two documents must be open.", /* Dimmed */
  401.             "", /* Enabled and Checked */
  402.             ""  /* Enabled and Marked */
  403.         },
  404.         HMStringItem { /* Stack Windows */
  405.             "Arranges all open document windows in a stacked pattern.", /* Enabled */
  406.             "Arranges all open document windows in a stacked pattern.\n\nNot available now because at least two documents must be open.", /* Dimmed */
  407.             "", /* Enabled and Checked */
  408.             ""  /* Enabled and Marked */
  409.         }
  410.     }
  411. };
  412.  
  413. resource 'MBAR' (rMenuBar, "Application menu bar", preload) {
  414.     { mApple, mFile, mEdit, mDocument }
  415. };
  416.  
  417. resource 'hmnu' (kDocumentNameMenuID, "Pop-up Document Name Menu help", purgeable) {
  418.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  419.     HMSkipItem {},
  420.     {
  421.         HMStringItem { "Hi!", "", "", "" }, /* Menu Title Help - Never Visible */
  422.         HMStringItem { "The document name.\n\nThis document has not been saved to disk.", "", "", "" } /* First Item Help - Always Document */
  423.     }
  424. };
  425.  
  426. resource 'hmnu' (kNavigationMenuID, "Pop-up Navigation Menu help", purgeable) {
  427.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  428.     HMStringItem { 
  429.         "To open this folder or disk window, choose this item.", /* Enabled items */
  430.         "To open this folder or disk window, choose this item.\n\nNot available because the Scriptable Finder is not installed.", /* Dimmed items */
  431.         "", /* Enabled and Checked items */
  432.         ""  /* Enabled and Marked items */
  433.     },
  434.     {
  435.         HMStringItem { "Hi!", "", "", "" }, /* Menu Title Help - Never Visible */
  436.         HMStringItem { "The document name.", "", "", "" } /* First Item Help - Always Document */
  437.     }
  438. };
  439.  
  440. resource 'hfdr' (kHMHelpID, "Application icon help", purgeable) {
  441.     HelpMgrVersion, hmDefaultOptions, 0, 0, { HMSTRResItem { rFinderIconHelp } }
  442. };
  443.  
  444. resource 'hovr' (rHelpOverride, "Window Title Bar Help Override", purgeable) {
  445.     HelpMgrVersion, hmDefaultOptions, 0, 0, 
  446.     HMStringItem { "Missing overide message." },
  447.     {
  448.         HMTEResItem { rHelpOverrideHelp },
  449.         HMSkipItem { },
  450.         HMSkipItem { },
  451.         HMSkipItem { },
  452.         HMSkipItem { },
  453.         HMSkipItem { },
  454.         HMSkipItem { }
  455.     }
  456. };
  457.  
  458. resource 'FREF' (rDocumentFREF, "Document File Reference") {
  459.     '.oO~', 0, ""
  460. };
  461.  
  462. resource 'FREF' (rApplicationFREF, "Application File Reference") {
  463.     'APPL', 1, ""
  464. };
  465.  
  466. resource 'DLOG' (rSplashScreen, "Splash Screen", preload) {
  467.     {77, 128, 275, 371}, altDBoxProc, visible, noGoAway, 0x0, rSplashScreen, "", centerMainScreen
  468. };
  469.  
  470. resource 'DITL' (rSplashScreen, "Splash Screen", preload) {
  471.     { 
  472.         {0, 0, 198, 243}, Picture { disabled, rSplashScreen } 
  473.     }
  474. };
  475.  
  476. resource 'ALRT' (rPermErrAlert, "Already Open", purgeable) {
  477.     {40, 40, 156, 390}, rPermErrAlert, beepStages, alertPositionMainScreen
  478. };
  479.  
  480. resource 'DITL' (rPermErrAlert, "Already Open") {
  481.     {
  482.         {86, 282, 106, 340}, Button { enabled, "OK" },
  483.         {10, 78, 74, 340}, StaticText {
  484.             disabled,
  485.             "The file “^0” could not be opened because it is already open for writing by "
  486.             "another application."
  487.         }
  488.     }
  489. };
  490.  
  491. resource 'ALRT' (rCloseDirtyAlert, "Save Changes before Closing", purgeable) {
  492.     {40, 40, 156, 390}, rCloseDirtyAlert, beepStages, alertPositionMainScreen
  493. };
  494.  
  495. resource 'DITL' (rCloseDirtyAlert, "Save Changes before Closing") {
  496.     {
  497.         {86, 282, 106, 340}, Button { enabled, "Save" },
  498.         {86, 215, 106, 273}, Button { enabled, "Cancel" },
  499.         {86, 78, 106, 158}, Button { enabled, "Don't Save" },
  500.         {10, 78, 74, 340}, StaticText {
  501.             disabled,
  502.             "Your document “^0” has been changed since the last time it was saved.\nSave changes "
  503.             "before closing?"
  504.         }
  505.     }
  506. };
  507.  
  508. resource 'ALRT' (rCloseAlert, "Trash Alert", purgeable) {
  509.     {116, 52, 231, 420}, rCloseAlert, beepStages, alertPositionMainScreen
  510. };
  511.  
  512. resource 'DITL' (rCloseAlert, "Trash Alert") {
  513.     {
  514.         {84, 297, 104, 357}, Button { enabled, "Save" },
  515.         {84, 141, 104, 284}, Button { enabled, "Remove from Trash" },
  516.         {84, 19, 104, 104}, Button { enabled, "Don’t Save" },
  517.         {10, 20, 42, 52}, Icon { disabled, rApplicationICON },
  518.         {10, 70, 74, 357}, StaticText { disabled,
  519.             "The ^0 document “^1” has been moved to the trash.\nSave changes before closing?"
  520.         }
  521.     }
  522. };
  523.  
  524. resource 'ALRT' (rMissingFeatureAlert, "Missing Features", purgeable) {
  525.     {40, 40, 190, 398}, rMissingFeatureAlert, beepStages, alertPositionMainScreen
  526. };
  527.  
  528. resource 'DITL' (rMissingFeatureAlert, "Missing Features") {
  529.     {
  530.         {120, 290, 140, 348}, Button { enabled, "OK" },
  531.         {10, 70, 110, 348}, StaticText { disabled,
  532.             "This program requires features which are not available on your machine. "
  533.             "\n\nMake sure you are using the most recent system software and have the "
  534.             "Finder Scripting extension installed."
  535.         },
  536.         {10, 20, 42, 52}, Icon { disabled, rApplicationICON }
  537.     }
  538. };
  539.  
  540. resource 'ALRT' (rNotImplementedAlert, "Not Implemented", purgeable) {
  541.     {40, 40, 150, 398}, rNotImplementedAlert, beepStages, alertPositionMainScreen
  542. };
  543.  
  544. resource 'DITL' (rNotImplementedAlert, "Not Implemented") {
  545.     {
  546.         {80, 290, 100, 348}, Button { enabled, "OK" },
  547.         {10, 70, 70, 348}, StaticText { disabled,
  548.             "This feature has not been implemented. It is provided to demonstrate "
  549.             "how a feature might be properly presented in the User Interface."
  550.         },
  551.         {10, 20, 42, 52}, Icon { disabled, rApplicationICON }
  552.     }
  553. };
  554.  
  555. resource 'ALRT' (rNoAccessAlert, "Access Denied", purgeable) {
  556.     {40, 40, 190, 398}, rNoAccessAlert, beepStages, alertPositionMainScreen
  557. };
  558.  
  559. resource 'DITL' (rNoAccessAlert, "Access Denied") {
  560.     {
  561.         {120, 290, 140, 348}, Button { enabled, "Now" },
  562.         {120, 70, 140, 128}, Button { enabled, "Later" },
  563.         {10, 70, 110, 350}, StaticText { disabled,
  564.             "Your document “^0” has been moved to a folder which you do not have access "
  565.             "to.\n\nWould you like to save your document to another location now or later?"
  566.         },
  567.         {10, 20, 42, 52}, Icon { disabled, rApplicationICON }
  568.     }
  569. };
  570.  
  571. resource 'ALRT' (rLowMemoryAlert, "Low Memory", preload) {
  572.     {40, 40, 190, 398}, rLowMemoryAlert, beepStages, alertPositionMainScreen
  573. };
  574.  
  575. resource 'DITL' (rLowMemoryAlert, "Low Memory", preload) {
  576.     {
  577.         {86, 282, 106, 340}, Button { enabled, "OK" },
  578.         {10, 78, 74, 340}, StaticText { disabled,
  579.             "There is very little space left in memory. Please close some windows as soon as possible."
  580.         }
  581.     }
  582. };
  583.  
  584. resource 'ALRT' (rRevertAlert, "Revert Document Alert", purgeable) {
  585.     {86, 60, 190, 432}, rRevertAlert, beepStages, alertPositionMainScreen
  586. };
  587.  
  588. resource 'DITL' (rRevertAlert, "Revert Document Alert") {
  589.     {
  590.         {74, 299, 94, 362}, Button { enabled, "Revert" },
  591.         {74, 223, 94, 286}, Button { enabled, "Cancel" },
  592.         {13, 65, 62, 311}, StaticText { disabled,
  593.             "Revert to the last saved version of the document “^0”?"
  594.         },
  595.     }
  596. };
  597.  
  598. resource 'DLOG' (rAbout, "Scrolling Styled Text About Box") {
  599.     {72, 68, 272, 368}, dBoxProc, invisible, noGoAway, 0x0, rAbout, "", alertPositionMainScreen
  600. };
  601.  
  602. resource 'DITL' (rAbout, "Scrolling Styled Text About Box") {
  603.     {
  604.         {170, 230, 190, 288}, Button { enabled, "OK" },
  605.         {10, 20, 42, 52}, Icon { disabled, rApplicationICON },
  606.         {10, 70, 160, 290}, UserItem { disabled },
  607.         {187, 2, 202, 176}, Picture { disabled, rCopyrightPicture }
  608.     }
  609. };
  610.  
  611. resource 'ALRT' (rErrorAlert, "Error Reporter", purgeable) {
  612.     {40, 40, 170, 360}, rErrorAlert, beepStages, alertPositionMainScreen
  613. };
  614.  
  615. resource 'DITL' (rErrorAlert, "Error Reporter") {
  616.     {
  617.         {100, 250, 120, 308}, Button { enabled, "OK" },
  618.         {10, 70, 90, 310}, StaticText { disabled, "An error of type ^0 (^1) has occurred.\n\n^2" }
  619.     }
  620. };
  621.  
  622. resource 'ALRT' (rEmptyTrashAlert, "Empty Trash Alert", purgeable) {
  623.     {86, 60, 206, 382}, rEmptyTrashAlert, beepStages, alertPositionMainScreen
  624. };
  625.  
  626. resource 'DITL' (rEmptyTrashAlert, "Empty Trash Alert") {
  627.     {
  628.         {90, 248, 110, 312}, Button { enabled, "OK" },
  629.         {10, 72, 80, 312}, StaticText { disabled,
  630.             "There is not enough room on ^0 to save your document. "
  631.             "There would be enough room if you emptied the ^1 K in the trash."
  632.         }
  633.     }
  634. };
  635.  
  636. resource 'ALRT' (rNotEnoughSpaceAlert, "No Space Alert", purgeable) {
  637.     {86, 60, 206, 382}, rNotEnoughSpaceAlert, beepStages, alertPositionMainScreen
  638. };
  639.  
  640. resource 'DITL' (rNotEnoughSpaceAlert, "No Space Alert") {
  641.     {
  642.         {90, 248, 110, 312}, Button { enabled, "OK" },
  643.         {10, 70, 80, 310}, StaticText { disabled,
  644.             "There is not enough room on the volume to save your document. "
  645.             "Please make some space or save to another volume."
  646.         }
  647.     }
  648. };
  649.  
  650. resource 'BNDL' (128) {
  651.     '.oO~', 0, {
  652.         'FREF', { 0, rDocumentFREF, 1, rApplicationFREF },
  653.         'ICN#', { 0, rDocumentFREF, 1, rApplicationFREF }
  654.     }
  655. };
  656.  
  657. type '.oO~' {
  658.         pstring;
  659. };
  660.  
  661. resource '.oO~' (0, "Owner resource") {
  662.     "Copyright 1994,1995 Mark H. Linton"
  663. };
  664.  
  665. resource 'SIZE' (-1) {
  666.     reserved,
  667.     acceptSuspendResumeEvents, reserved,
  668.     canBackground,
  669.     multiFinderAware,
  670.     backgroundAndForeground,
  671.     dontGetFrontClicks,
  672.     ignoreChildDiedEvents,
  673.     is32BitCompatible,
  674.     isHighLevelEventAware,
  675.     localAndRemoteHLEvents,
  676.     isStationeryAware,
  677.     dontUseTextEditServices, reserved, reserved, reserved,
  678.     1024000,
  679.     1024000
  680. };